package com.meida.module.bus.provider.controller;


import com.meida.common.mybatis.model.ResultBody;
import com.meida.common.springmvc.base.BaseController;
import com.meida.module.bus.provider.service.BusConfigService;
import com.meida.module.system.client.entity.SysConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;

/**
 * 系统配置
 *
 * @author flyme
 * @date 2019-06-10
 */
@RestController
@RequestMapping("/config/")
@Api(tags = "基础模块-系统配置")
@ApiIgnore
public class BusConfigController extends BaseController<BusConfigService, SysConfig> {


    @ApiOperation(value = "CHARGES_CONFIG配置保存", notes = "平台提现介绍")
    @PostMapping(value = "saveCharges")
    @ApiIgnore
    public ResultBody saveCharges(@RequestParam(required = false) Map params) {
        return bizService.saveCharges(params);
    }

    @ApiOperation(value = "预售合伙人设置", notes = "预售合伙人设置")
    @PostMapping(value = "savePartner")
    @ApiIgnore
    public ResultBody savePartner(@RequestParam(required = false) Map params) {
        return bizService.savePartner(params);
    }

    @ApiOperation(value = "订单设置", notes = "订单设置")
    @PostMapping(value = "saveOrder")
    @ApiIgnore
    public ResultBody saveOrder(@RequestParam(required = false) Map params) {
        return bizService.saveOrder(params);
    }

    @ApiOperation(value = "买商品分红设置", notes = "买商品分红设置")
    @PostMapping(value = "saveBonus")
    @ApiIgnore
    public ResultBody saveBonus(@RequestParam(required = false) Map params) {
        return bizService.saveBonus(params);
    }

    @ApiOperation(value = "买会员分红", notes = "买会员分红")
    @PostMapping(value = "saveVipBonus")
    @ApiIgnore
    public ResultBody saveVipBonus(@RequestParam(required = false) Map params) {
        return bizService.saveVipBonus(params);
    }

    @ApiOperation(value = "加权分红", notes = "加权分红")
    @PostMapping(value = "saveWeighting")
    @ApiIgnore
    public ResultBody saveWeighting(@RequestParam(required = false) Map params) {
        return bizService.saveWeighting(params);
    }


    @ApiOperation(value = "佣金设置", notes = "佣金设置")
    @PostMapping(value = "saveCommission")
    @ApiIgnore
    public ResultBody saveCommission(@RequestParam(required = false) Map params) {
        return bizService.saveCommission(params);
    }

    @ApiOperation(value = "年度任务量配置", notes = "年度任务量配置")
    @PostMapping(value = "savePopularize")
    @ApiIgnore
    public ResultBody savePopularize(@RequestParam(required = false) Map params) {
        return bizService.savePopularize(params);
    }


}
